﻿@model TCCVoigt.Models.Restricao

@{
    ViewBag.Title = "Create";
}

<h2>Adicionar</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")"></script>
<script src="@Url.Content("~/Scripts/jquery-ui-1.8.11.js")" type="text/javascript"></script>

<script type="text/javascript">
    $(document).ready(function () {
        $('#DataInicio').datepicker({ dateFormat: "dd/mm/yy HH:mm" });
        $('#DataFim').datepicker({ dateFormat: "dd/mm/yy HH:mm" });
    });
</script>
@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>Restricao</legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.CodigoRecurso, "Recurso")
        </div>
        <div class="editor-field">
            @Html.DropDownList("CodigoRecurso", String.Empty)
            @Html.ValidationMessageFor(model => model.CodigoRecurso)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.CodigoTipoRestricao, "TipoRestricao")
        </div>
        <div class="editor-field">
            @Html.DropDownList("CodigoTipoRestricao", String.Empty)
            @Html.ValidationMessageFor(model => model.CodigoTipoRestricao)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Descricao)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Descricao)
            @Html.ValidationMessageFor(model => model.Descricao)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.DataInicio)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.DataInicio)
            @Html.ValidationMessageFor(model => model.DataInicio)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.DataFim)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.DataFim)
            @Html.ValidationMessageFor(model => model.DataFim)
        </div>

        

        
        <p>
            <input type="submit" value="Gravar" />
        </p>
    </fieldset>
}

<div>
    <a href="@Url.Action("Index")"><img src="~/Images/ico_back.png" alt="" border="0" style="float: left"/>Voltar</a>
</div>
